import { getCurrentLang } from "@/config/app-language";

let lang = getCurrentLang();

// 根据网站语言类型，匹配ViewUI语言name
export function getViewUiLanguageName() {
    let viewUiName = require("view-design/dist/locale/en-US.js");
    switch (lang) {
        // 中
        case "zh_CN":
            viewUiName = require("view-design/dist/locale/zh-CN.js");
            break;
        // 英
        case "en_US":
            viewUiName = require("view-design/dist/locale/en-US.js");
            break;
        // 德
        case "de_DE":
            viewUiName = require("view-design/dist/locale/de-DE.js");
            break;
        // 意大利
        case "it_IT":
            viewUiName = require("view-design/dist/locale/it-IT.js");
            break;
        // 波兰
        case "pl_PL":
            viewUiName = require("view-design/dist/locale/pl-PL.js");
            break;
        // 西班牙
        case "es_ES":
            viewUiName = require("view-design/dist/locale/es-ES.js");
            break;
        // 法语
        case "fr_FR":
            viewUiName = require("view-design/dist/locale/fr-FR.js");
            break;
        // 葡萄牙
        case "pt_PT":
            viewUiName = require("view-design/dist/locale/pt-PT.js");
            break;
        case "zh_HK":
            viewUiName = require("view-design/dist/locale/zh-TW.js");
            break;
        case "ja_JP":
            viewUiName = require("view-design/dist/locale/ja-JP.js");
            break;
        case "ko_KR":
            viewUiName = require("view-design/dist/locale/ko-KR.js");
            break;
    }
    return viewUiName;
}

// 根据网站的语言类型，匹配zendesk语言name
export function getzendeskLanguageName() {
    let zendeskName = "en-US";
    switch (lang) {
        case "zh_CN":
            zendeskName = "zh-cn";
            break;
        case "en_US":
            zendeskName = "en-US";
            break;
        case "de_DE":
            zendeskName = "de-DE";
            break;
        case "it_IT":
            zendeskName = "it-IT";
            break;
        case "pl-PL":
            zendeskName = "pl-PL";
            break;
        case "es_ES":
            zendeskName = "es-ES";
            break;
        case "fr_FR":
            zendeskName = "fr-FR";
            break;
        case "pt_PT":
            zendeskName = "pt-PT";
            break;
        case "zh_HK":
            zendeskName = "zh-tw";
            break;
        case "ja_JP":
            zendeskName = "ja";
            break;
        case "ko_KR":
            zendeskName = "ko";
            break;
    }
    return zendeskName;
}
